Aller au contenu principal

9.1-interface-conversion

9.1 Interface Conversion

In actual business scenarios, when a third-party interface is registered on the integration platform, the data format returned by the third-party interface often does not match the format required for actual business operations. Therefore, the purpose of interface conversion is to convert the output into a parameter format that aligns with business needs.

Example of Interface Conversion: The original interface returns three parameters, but only one of them is needed in actual business scenarios. The conversion can be performed using the following steps.

For example, the configuration information for a third-party original interface is as follows:

The returned value of the interface is an object (with three properties: fdId, fdName, and fdOrgType), as follows:

However, in an actual business scenario, a specific node in the process may only require the fdName property of the object. This can be implemented through interface conversion. The detailed steps are as follows:

  1. Basic information Configuration:

    • Interface Name: Customized.
    • System: The system to which this interface belongs.
    • Capability: The system's capability expansion point to which the interface belongs. An interface can belong to multiple capabilities. Optional.
    • Function Identification: Auto-fill or manually input. Unique.
    • Usage Scenario: Fetch or Write in
    • Pagination: Can be enabled or disabled.
  2. Parameter Information: Import parameters - Select an interface (original interface) from the system and click "Confirm". The input and output parameters of the selected interface will be automatically extracted and filled in.

    Display Effect:

    The returned value required by the business scenario is a string, so the returned parameters should be set as follows:

  3. Conversion Rules Configuration:

    3-1 Process Variables Configuration: Typically, this process variable is configured to receive the returned value from the original interface function.

    • Variable Name: Customized.
    • Variable Code: Customized. Cannot contain Chinese or special characters.
    • Data Type: Typically consistent with the original interface.
    • Value Setting: Users can directly select the interface of the integration platform, which will auto-fill the input parameters. Users can select variables to reference and match them with the input parameters in the parameter information.

    3-2 Configuration Results The process variable has received the returned value of the original function. Now users just need to access the fdName property from the process variables. Click "Save" after configuration.

    Click on "Data Query" to verify if the data format is correct after saving.